<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\grid\GridView;
$this->params['breadcrumbs'][] = ['label' => $model->source_id, 'url' => ['sourcesave', 'id' => $model->source_id]];
?>


	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">修改来源</h4>
			</div>
			<?php 
				$form = ActiveForm::begin([
					'options' => ['class' => 'form-horizontal',
					'id'=>'type-form'],
					'action'=>'/index.php?r=course/sourceupdate',
					'method'=>'post',
					'fieldConfig' => [
						'template' => '<div class="form-group"><center><label class="col-md-2 control-label" for="type-name-field">{label}</label></center><div class="col-md-8 controls">{input}{error}</div></div>'
					], 
				]);
			?>
			<div class="modal-body">
				<div id="type-creater-widget">
					<?= $form->field($model, 'source_id', ['template'=>'<div class="form-group"><div class="col-md-8 controls">{input}{error}</div></div>'])->hiddenInput() ?>

					<?= $form->field($model, 'source_name',['inputOptions'=>['placeholder'=>'请输入来源名称']])->textInput(['maxlength' => true]) ?>

					<?= $form->field($model, 'source_sort',['inputOptions'=>['value'=>50]])->textInput() ?>

					<?= $form->field($model,'is_show')->radioList(['1'=>'显示','0'=>'不显示'],['separator'=>" ","style"=>"padding-top:6px;"]); ?> 
				</div>
			</div>
			<div class="modal-footer">	
				<button type="button" class="btn btn-link" data-dismiss="modal" tabindex="6">取消</button>
				<?= Html::submitButton('修改', ['class' => 'btn btn-primary','id'=>'category-create-btn']) ?>
			</div>

			<?php ActiveForm::end(); ?>
		</div>
	</div>
